package com.feng.zhihao.apigeteway.entity;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ChannelProjectId entity. @author MyEclipse Persistence Tools
 */
@Embeddable

public class ChannelProjectId implements java.io.Serializable {

	// Fields

	private String channelId;
	private String projectId;

	// Constructors

	/** default constructor */
	public ChannelProjectId() {
	}

	/** full constructor */
	public ChannelProjectId(String channelId, String projectId) {
		this.channelId = channelId;
		this.projectId = projectId;
	}

	// Property accessors

	@Column(name = "CHANNEL_ID", nullable = false, length = 36)

	public String getChannelId() {
		return this.channelId;
	}

	public void setChannelId(String channelId) {
		this.channelId = channelId;
	}

	@Column(name = "PROJECT_ID", nullable = false, length = 36)

	public String getProjectId() {
		return this.projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ChannelProjectId))
			return false;
		ChannelProjectId castOther = (ChannelProjectId) other;

		return ((this.getChannelId() == castOther.getChannelId()) || (this.getChannelId() != null
				&& castOther.getChannelId() != null && this.getChannelId().equals(castOther.getChannelId())))
				&& ((this.getProjectId() == castOther.getProjectId()) || (this.getProjectId() != null
						&& castOther.getProjectId() != null && this.getProjectId().equals(castOther.getProjectId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getChannelId() == null ? 0 : this.getChannelId().hashCode());
		result = 37 * result + (getProjectId() == null ? 0 : this.getProjectId().hashCode());
		return result;
	}

}